<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.3.0: http://docutils.sourceforge.net/" />
<title>vb2Py - Enumerations</title>
<link rel="stylesheet" href="default.css" type="text/css" />
</head>
<body>
<div class="document" id="vb2py-enumerations">
<h1 class="title">vb2Py - Enumerations</h1>
<!-- filename: c:\development\python22\lib\site-packages\vb2py\doc/enumerations.htm -->
<p>Contents of this page:</p>
<ul class="simple">
<li><a class="reference" href="#general">General</a></li>
<li><a class="reference" href="#default-conversion">Default Conversion</a></li>
<li><a class="reference" href="#list-of-options">List of Options</a></li>
</ul>
<div class="section" id="general">
<h1><a name="general">General</a></h1>
<p><tt class="literal"><span class="pre">Enumeration</span></tt> types in VB allow the representation of a single value by a number of different <em>states</em>. Python has no equivalent concept and so enumerations are simply mapped to a series of integer values. The enumeration names become local or global names depending on the scope of the enumeration. If the values for the enumeration items are specified then these are used, if not then the values are chosen sequentially starting at zero.</p>
</div>
<div class="section" id="default-conversion">
<h1><a name="default-conversion">Default Conversion</a></h1>
<p>VB:</p>
<pre class="literal-block">
Enum Number
            One = 1
            Two = 2
            Three = 3
            Four = 4
            Ten = 10
            Hundred = 100
    End Enum

    Enum Day        
            Mon
            Tue
            Wed
            Thu
            Fri
    End Enum
</pre>
</div>
<div class="section" id="list-of-options">
<h1><a name="list-of-options">List of Options</a></h1>
<p>There are no options specific to the <tt class="literal"><span class="pre">Enum</span></tt> statement.</p>
</div>
</div>
</body>
</html>
